<template>
  <div class="MyBreadItem">
    <template v-if="to">
      <router-link to="to"> <slot></slot> </router-link>
      <span>{{ eparator }} </span>
    </template>
    <template v-else>
      <slot></slot>
      <span>{{ eparator }} </span>
    </template>
  </div>
</template>


<script>
export default {
  name: 'MyBreadItem',
  inject: ['eparator'],
  props: {
    to: {
      type: [String, Object]
    }
  },
  data () {
    return {

    }
  },
  created () {
  },
  computed: {
  },
  methods: {
  }
}
</script>
<style lang='scss'  scoped>
.MyBreadItem {
  span {
    margin: 0 5px;
  }
  &:last-child {
    span {
      display: none;
    }
  }
}
</style>
